package cn.wolfcode.util;

import cn.wolfcode.domain.Employee;
import org.apache.shiro.crypto.hash.Md5Hash;

public abstract class RepairPassword {

    public static Employee getPasswordHeightenEmployee(Employee employee){
        Md5Hash md5Hash = new Md5Hash(employee.getPassword(), employee.getName());
        employee.setPassword(md5Hash.toString());
        return employee;
    }

    public static String getPasswordHeighten(String name,String password){
        Md5Hash md5Hash = new Md5Hash(password,name);
        return md5Hash.toString();
    }
}
